package com.mew.common.rest.gold;

import com.mew.common.entity.config.JewelProduct;
import com.mew.common.entity.config.MoneyProduct;
import com.zebra.common.ZebraBaseMessage;
import io.netty.buffer.ByteBuf;
import lombok.Data;
import lombok.ToString;

import java.util.List;

@Data
@ToString
public class GoldBuyMessage extends ZebraBaseMessage<GoldBuyMessage> {

    List<JewelProduct> jewelProduct ;
    List<MoneyProduct> moneyProduct ;

    @Override
    public void write(ByteBuf b) {
        writeInt(b,jewelProduct.size());
        for (JewelProduct product : jewelProduct) {
            product.write(b);
        }

        writeInt(b,moneyProduct.size());
        for (MoneyProduct product : moneyProduct) {
            product.write(b);
        }


    }

    @Override
    public GoldBuyMessage read(ByteBuf byteBuf) {
        return null;
    }
}
